home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9154 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: preprocessing questio
  5. Date: 8 Mar 1996 12:01:53 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4hp7jh$krh@gail.ripco.com>
  8. NNTP-Posting-Host: golden.ripco.com
  9.  
  10. jalvo@cloud9.net (John G. Alvord) in <313b9e9f.480978@NEWS.CLOUD9.NET>
  11. writes:
  12.  
  13. >   #define XXX (1)
  14. >   #include <stdio.h>
  15. >   int main(void)
  16. >   {
  17. >       #if XXX
  18. >           printf("Hello World!");
  19. >       #endif
  20. >       return 0;
  21. >    }
  22.  
  23. [...]
  24. >....  A close reading of the ANSI C standard document
  25. >reveals a clause that seems to imply (my reading) that a pre-processed series
  26. >of tokens that appear to be a preprocessing statement will be ignored...
  27.  
  28. ISO 6.8.1 contains the language, concerning #if
  29.     "Prior to evaluation, macro invocations in the list of preprocessing
  30.     tokens that will become the controling constant expression (except
  31.     for those macro names modified by the defined unary operator) just
  32.     as in ordinary text."
  33. I suggest including this in your `close reading.'
  34.                                                                                                      
  35. --
  36. * Martin Ambuhl       net: mambuhl@ripco.com
  37. * Chicago, IL (USA)    
  38.